package com.sw.study.mybatis.practice.dynamicsql;

import com.sw.study.mybatis.practice.pojo.Role;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by sw on 2020/3/30.
 */
public interface RoleMapper {

    public List<Role> selectRoleAndUser();

    /**
     * 根据用户id查询角色集合
     * @param uid
     * @return
     */
    @Select("select * from tb_role where uid=#{uid}")
    public List<Role> selectRolesByUid(Long uid);

}
